package com.gy.sc.scconsumermovie.remote;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.gy.sc.scconsumermovie.entity.TUser;

@FeignClient(name = "sc-provider-user", fallback = UserRemoteFallBack.class)
public interface UserRemote {

    @RequestMapping("/get/user/{id}")
    public TUser getUserById(@PathVariable("id") Integer id);

}

@Component
class UserRemoteFallBack implements UserRemote {

    @Override
    public TUser getUserById(Integer id) {
        return null;
    }
    
}